package com.skateboard.reelviewtest

import android.content.Intent
import android.os.Bundle
import android.util.Log
import android.view.View
import androidx.appcompat.app.AppCompatActivity
import com.skateboard.reelviewtest.path.PathActivity
import com.skateboard.reelviewtest.loopviewpager.ViewPagerActivity
import kotlinx.android.synthetic.main.activity_start.*

class StartActivity : AppCompatActivity(), View.OnClickListener {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_start)
        btn_3d_rotate.setOnClickListener(this)
        btn_reelview.setOnClickListener(this)
        btn_recycleview.setOnClickListener(this)
        btn_list.setOnClickListener(this)
        btn_number?.setOnClickListener(this)

        btn_select?.setOnClickListener(this)
        btn_border.setOnClickListener(this)
        btn_test.setOnClickListener(this)
        btn_test_translation.setOnClickListener(this)
        btn_test_bouncescroll.setOnClickListener(this)
        btn_viewpager.setOnClickListener(this)

        var file1=getExternalFilesDir(null)
        var file2 = filesDir
        Log.e("ssss","file1====:"+file1?.absolutePath)
        Log.e("ssss","file2====:"+file2?.absolutePath)

    }

    /**
     * 点击事件
     */
    override fun onClick(view: View?) {
        when(view?.id){
            R.id.btn_3d_rotate->{
                startActivity(Intent(this,Test3dRotateActivity::class.java))
            }
            R.id.btn_reelview->{
                startActivity(Intent(this,Reel2Activity::class.java))
            }

            R.id.btn_recycleview->{
                startActivity(Intent(this,RecyclerGalleryActivity::class.java))
            }

            R.id.btn_list->{
                startActivity(Intent(this,List3Rotate2Activity::class.java))
            }
            R.id.btn_border->{
                startActivity(Intent(this,PathActivity::class.java))
            }
            R.id.btn_number->{
                startActivity(Intent(this,NumberActivity::class.java))
            }
            R.id.btn_select->{
                startActivity(Intent(this,SelectActivity::class.java))
            }
            R.id.btn_test->{
                startActivity(Intent(this,ViewSubViriableActivity::class.java))
            }
            R.id.btn_test_translation->{
                startActivity(Intent(this,TestTranslationActivity::class.java))
            }
            R.id.btn_test_bouncescroll->{
                startActivity(Intent(this,TestTranslationActivity::class.java))
            }
            R.id.btn_viewpager->{
                startActivity(Intent(this,ViewPagerActivity::class.java))
            }
        }
    }
}